import Vue from 'vue'

import ycContainer from './yc-container'

// 注意 有些组件使用异步加载会有影响
Vue.component('yc-container', ycContainer)

const vueFiles = require.context('./', true, /component\.vue$/)
vueFiles.keys().forEach(key => {
  const component = vueFiles(key).default
  Vue.component(component.name, component)
})

const jsFiles = require.context('./', true, /component\.js$/)
jsFiles.keys().forEach(key => {
  const component = jsFiles(key).default
  Vue.component(component.name, component)
})
